package com.ccsc.auth.service;

import com.ccsc.auth.entity.Department;
import com.ccsc.auth.utils.DataMap;
import com.ccsc.auth.utils.Page;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;

import java.util.List;

/**
 * 部门service
 * Created by yyangs on 2017/2/10.
 */
public interface DepartmentService {

    List<Department> getAllDepartments() throws Exception;       						    //获取全部部门列表
    List<Department> getDepartmentsByStatus(Integer status) throws Exception;   			//根据部门状态查部门信息
    List<Department> getDepartmentsByName(String name) throws Exception;   			//根据部门状态查部门信息
    List<Department> getDepartmentsByParentDepartmentId(Integer parentDepartmentId) throws Exception;   	//根据部门状态查部门信息

    Page getDepartmentsByPage(DataMap params) throws Exception;					            //分页并根据条件查询部门列表
    Page getDepartmentsByPage(Department department,DataMap params) throws Exception;		//分页并根据条件查询部门列表
    Department getDepartmentById(Integer id) throws Exception;   						    //根据部门ID查部门信息
    Department getDepartmentByIdentifier(String identifier) throws Exception; 			//根据部门标识符查部门信息

    Integer createDepartment(Department department) throws Exception;  						//添加部门
    Integer updateDepartment(Department department) throws Exception;   		   			//修改部门
    Integer deleteDepartmentById(Integer id) throws Exception; 					            //删除部门
    Integer activeDepartment(Integer id) throws Exception;							        //激活部门
    Integer withdrawDepartment(Integer id) throws Exception;						        //注销部门
    Integer batchActiveDepartment(List<Integer> ids) throws Exception;				        //批量激活部门
    Integer batchWithdrawDepartment(List<Integer> ids) throws Exception;			    	//批量注销部门
}
